package router

import (
	"github.com/gin-gonic/gin"
	"userCRUD/controllers"
	"userCRUD/middleware"
)

func userRouter(r *gin.RouterGroup) {
	user := r.Group("v1/user")

	user.POST("/login", controllers.User.Login)

	user.Use(middleware.AuthToken)
	user.POST("/add", controllers.User.AddUser)
	user.POST("/update", controllers.User.UpdateUserByAdmin)
	user.GET("/get/vo", controllers.User.GetUserVOByUserId)
	user.GET("/get", controllers.User.GetUserByUserId)

}
